<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
      <title>海德瀚(Heidenhain)控制器支援 | HiAPI-C# 2025 </title>
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <meta name="title" content="海德瀚(Heidenhain)控制器支援 | HiAPI-C# 2025 ">
      
      
      <link rel="icon" href="../../../../img/HiAPI.favicon.ico">
      <link rel="stylesheet" href="../../../../public/docfx.min.css">
      <link rel="stylesheet" href="../../../../public/main.css">
      <meta name="docfx:navrel" content="../../../../toc.html">
      <meta name="docfx:tocrel" content="../toc.html">
      
      <meta name="docfx:rel" content="../../../../">
      
      
      
      <meta name="loc:inThisArticle" content="In this article">
      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
      <meta name="loc:tocFilter" content="Filter by title">
      <meta name="loc:nextArticle" content="Next">
      <meta name="loc:prevArticle" content="Previous">
      <meta name="loc:themeLight" content="Light">
      <meta name="loc:themeDark" content="Dark">
      <meta name="loc:themeAuto" content="Auto">
      <meta name="loc:changeTheme" content="Change theme">
      <meta name="loc:copy" content="Copy">
      <meta name="loc:downloadPdf" content="Download PDF">

      <script type="module" src="./../../../../public/docfx.min.js"></script>

      <script>
        const theme = localStorage.getItem('theme') || 'auto'
        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
      </script>

  </head>

  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="">
    <header class="bg-body border-bottom">
      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
        <div class="container-xxl flex-nowrap">
          <a class="navbar-brand" href="../../../../index.html">
            <img id="logo" class="svg" src="../../../../img/HiAPI.logo.png" alt="">
            
          </a>
          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
            <i class="bi bi-three-dots"></i>
          </button>
          <div class="collapse navbar-collapse" id="navpanel">
            <div id="navbar">
              <form class="search" role="search" id="search">
                <i class="bi bi-search"></i>
                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
              </form>
            </div>
          </div>
        </div>
      </nav>
    </header>

    <main class="container-xxl">
      <div class="toc-offcanvas">
        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
          <div class="offcanvas-header">
            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
          </div>
          <div class="offcanvas-body">
            <nav class="toc" id="toc"></nav>
          </div>
        </div>
      </div>

      <div class="content">
        <div class="actionbar">
          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
            <i class="bi bi-list"></i>
          </button>

          <nav id="breadcrumb"></nav>
        </div>

        <article data-uid="">
          <h1 id="海德瀚heidenhain控制器支援">海德瀚(Heidenhain)控制器支援</h1>

<p>本章說明 HiNC 對海德瀚 TNC640、TNC530 控制器 NC 碼之支援。</p>
<p>海德瀚控制器支援通用ISO語法。HiNC支援的通用ISO語法載於其他文件。</p>
<p>文件中沒有寫到的，一般是不支援。不支援 R 半徑補正指令。</p>
<h2 id="格式支援">格式支援</h2>
<p>除L碼及FQ碼外，字母指令間須以空白分隔，否則無法解析。</p>
<blockquote>
<p>可解析：</p>
<ul>
<li><code>FMAX M03</code></li>
<li><code>LX-26.3 Y+43.1 Z+100.3 A-90.0 C+13.123 FQ3</code></li>
</ul>
</blockquote>
<blockquote>
<p>無法解析：
<code>FMAXM03</code></p>
</blockquote>
<p>支援 <code>L</code> 移動指令。</p>
<blockquote>
<p>可解析：</p>
<ul>
<li><code>LX+0Y+0FMAX</code></li>
<li><code>L X+0 Y+0 FMAX</code></li>
</ul>
</blockquote>
<h2 id="巨集支援">巨集支援</h2>
<h3 id="q變數賦值">Q變數賦值</h3>
<p>支援Q變數賦值。</p>
<blockquote>
<p>可解析：</p>
<ul>
<li><code>Q1 = 5000</code></li>
<li><code>Q2 = 123</code></li>
<li><code>Q3 = 1000</code></li>
<li><code>LX-26.3 Y+43.1 Z+100.3 A-90.0 C+13.123 FQ3</code></li>
</ul>
</blockquote>
<h3 id="q變數運算">Q變數運算</h3>
<p>支援以下運算巨集：</p>
<ul>
<li><code>FN0</code> 指定數值。</li>
<li><code>FN1</code> 計算及指定兩個值的總和。</li>
<li><code>FN2</code> 計算及指定兩個值的差值。</li>
<li><code>FN3</code> 計算及指定兩個值的乘積。</li>
</ul>
<blockquote>
<p>可解析：</p>
<ul>
<li><code>FN0: Q1 = 5000</code></li>
<li><code>FN1: Q1 = -Q2 + -5</code></li>
<li><code>FN2: Q1 = +10 - +5</code></li>
<li><code>FN3: Q2 = +3 * +3</code></li>
</ul>
</blockquote>
<h2 id="tool-call">TOOL CALL</h2>
<p>支援 <code>TOOL CALL</code>，但是刀具名稱須為數字。</p>
<blockquote>
<p>可解析：</p>
<ul>
<li><code>TOOL CALL &quot;1&quot; Z S5000</code></li>
<li><code>TOOL CALL 1 Z S5000</code></li>
</ul>
</blockquote>
<blockquote>
<p>無法解析：
<code>TOOL CALL &quot;ET1&quot; S5000</code></p>
</blockquote>
<h2 id="cycl-def-7">CYCL DEF 7</h2>
<p>支援 <code>CYCL DEF 7</code> 工件原點位移指令。</p>
<blockquote>
<p>可解析：</p>
<pre><code>CYCL DEF 7.0 DATUM SHIFT
CYCL DEF 7.1 X10.123
CYCL DEF 7.2 Y22.223
CYCL DEF 7.3 Z32.97
</code></pre>
</blockquote>
<h2 id="cycl-def-247">CYCL DEF 247</h2>
<p>支援 <code>CYCL DEF 247</code> 工件原點設定。支援 <code>Q339</code> 座標索引。</p>
<blockquote>
<p>可解析：<code>CYCL DEF 247 Q339=+1</code></p>
</blockquote>
<h2 id="plane-系列指令">PLANE 系列指令</h2>
<h3 id="運動行為指令">運動行為指令</h3>
<p>支援三擇一運動行為指令： { <code>STAY</code> , <code>TURN</code> , <code>MOVE</code> } 。</p>
<h3 id="seq">SEQ</h3>
<p>支援 { <code>SEQ+</code> , <code>SEQ-</code> } 主動軸旋轉方向指令。</p>
<h3 id="table-rot">TABLE ROT</h3>
<p>支援 <code>TABLE ROT</code> 工作臺旋轉指令。</p>
<h3 id="plane-spatial">PLANE SPATIAL</h3>
<blockquote>
<p>可解析：<code>PLANE SPATIAL SPA-60.3 SPB+0 SPC-19.88 STAY SEQ- TABLE ROT</code></p>
</blockquote>
<h3 id="plane-reset">PLANE RESET</h3>
<blockquote>
<p>可解析：<code>PLANE RESET STAY</code></p>
</blockquote>
<h2 id="海德瀚特有-m-碼">海德瀚特有 M 碼</h2>
<p>支援以下海德瀚特有 M 碼。通用 ISO M 碼載於其他文件。</p>
<h3 id="m91">M91</h3>
<p>支援 <code>M91</code> 單行效的機械座標位移。</p>
<blockquote>
<p>可解析：<code>L Z-1 F5000 M91</code></p>
</blockquote>
<h3 id="m107">M107</h3>
<p><strong>略過</strong> <code>M107</code> 顯示錯誤訊息指令。</p>
<h3 id="m108">M108</h3>
<p><strong>略過</strong> <code>M108</code> 重置 <code>M107</code> 指令。</p>
<h3 id="m126">M126</h3>
<p>支援 <code>M126</code> 在旋轉軸上以較短路徑移動。</p>
<h3 id="m127">M127</h3>
<p>支援 <code>M127</code> 重置 <code>M126</code> 指令。</p>
<h4 id="控制器參數欄位-300401">控制器參數欄位 300401</h4>
<p>支援控制器參數欄位 <code>300401</code> ，若該參數為真則不論是否下達 <code>M127</code> 都會在旋轉軸上以較短路徑移動。</p>
<p>參數欄位 <code>300401</code> 預設值為真。</p>
<h3 id="m128">M128</h3>
<p>支援 <code>M128</code> 啟用刀尖點控制(TCPM)。</p>
<h3 id="m129">M129</h3>
<p>支援 <code>M129</code> 取消刀尖點控制(TCPM)。</p>
<h3 id="m140">M140</h3>
<p>支援 <code>M140 MB</code> <code>M140 MB MAX</code> 退刀指令。</p>
<blockquote>
<p>可解析：</p>
<ul>
<li><code>M140 MB MAX</code></li>
<li><code>M140 MB+50 F6000</code></li>
</ul>
</blockquote>

</article>

        <div class="contribution d-print-none">
        </div>

        <div class="next-article d-print-none border-top" id="nextArticle"></div>

      </div>

      <div class="affix">
        <nav id="affix"></nav>
      </div>
    </main>

    <div class="container-xxl search-results" id="search-results"></div>

    <footer class="border-top text-secondary">
      <div class="container-xxl">
        <div class="flex-fill">
          <span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
        </div>
      </div>
    </footer>
  </body>
</html>
